{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport Header from \"../Header\";\nimport { YEAR_DECADE_COUNT } from '.';\nimport PanelContext from \"../../PanelContext\";\nfunction YearHeader(props) {\n  var prefixCls = props.prefixCls,\n    generateConfig = props.generateConfig,\n    viewDate = props.viewDate,\n    onPrevDecade = props.onPrevDecade,\n    onNextDecade = props.onNextDecade,\n    onDecadeClick = props.onDecadeClick;\n  var _React$useContext = React.useContext(PanelContext),\n    hideHeader = _React$useContext.hideHeader;\n  if (hideHeader) {\n    return null;\n  }\n  var headerPrefixCls = \"\".concat(prefixCls, \"-header\");\n  var yearNumber = generateConfig.getYear(viewDate);\n  var startYear = Math.floor(yearNumber / YEAR_DECADE_COUNT) * YEAR_DECADE_COUNT;\n  var endYear = startYear + YEAR_DECADE_COUNT - 1;\n  return /*#__PURE__*/React.createElement(Header, _extends({}, props, {\n    prefixCls: headerPrefixCls,\n    onSuperPrev: onPrevDecade,\n    onSuperNext: onNextDecade\n  }), /*#__PURE__*/React.createElement(\"button\", {\n    type: \"button\",\n    onClick: onDecadeClick,\n    className: \"\".concat(prefixCls, \"-decade-btn\")\n  }, startYear, \"-\", endYear));\n}\nexport default YearHeader;","map":{"version":3,"names":["_extends","React","Header","YEAR_DECADE_COUNT","PanelContext","YearHeader","props","prefixCls","generateConfig","viewDate","onPrevDecade","onNextDecade","onDecadeClick","_React$useContext","useContext","hideHeader","headerPrefixCls","concat","yearNumber","getYear","startYear","Math","floor","endYear","createElement","onSuperPrev","onSuperNext","type","onClick","className"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/rc-picker/es/panels/YearPanel/YearHeader.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport Header from \"../Header\";\nimport { YEAR_DECADE_COUNT } from '.';\nimport PanelContext from \"../../PanelContext\";\n\nfunction YearHeader(props) {\n  var prefixCls = props.prefixCls,\n      generateConfig = props.generateConfig,\n      viewDate = props.viewDate,\n      onPrevDecade = props.onPrevDecade,\n      onNextDecade = props.onNextDecade,\n      onDecadeClick = props.onDecadeClick;\n\n  var _React$useContext = React.useContext(PanelContext),\n      hideHeader = _React$useContext.hideHeader;\n\n  if (hideHeader) {\n    return null;\n  }\n\n  var headerPrefixCls = \"\".concat(prefixCls, \"-header\");\n  var yearNumber = generateConfig.getYear(viewDate);\n  var startYear = Math.floor(yearNumber / YEAR_DECADE_COUNT) * YEAR_DECADE_COUNT;\n  var endYear = startYear + YEAR_DECADE_COUNT - 1;\n  return /*#__PURE__*/React.createElement(Header, _extends({}, props, {\n    prefixCls: headerPrefixCls,\n    onSuperPrev: onPrevDecade,\n    onSuperNext: onNextDecade\n  }), /*#__PURE__*/React.createElement(\"button\", {\n    type: \"button\",\n    onClick: onDecadeClick,\n    className: \"\".concat(prefixCls, \"-decade-btn\")\n  }, startYear, \"-\", endYear));\n}\n\nexport default YearHeader;"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,MAAM,WAAW;AAC9B,SAASC,iBAAiB,QAAQ,GAAG;AACrC,OAAOC,YAAY,MAAM,oBAAoB;AAE7C,SAASC,UAAU,CAACC,KAAK,EAAE;EACzB,IAAIC,SAAS,GAAGD,KAAK,CAACC,SAAS;IAC3BC,cAAc,GAAGF,KAAK,CAACE,cAAc;IACrCC,QAAQ,GAAGH,KAAK,CAACG,QAAQ;IACzBC,YAAY,GAAGJ,KAAK,CAACI,YAAY;IACjCC,YAAY,GAAGL,KAAK,CAACK,YAAY;IACjCC,aAAa,GAAGN,KAAK,CAACM,aAAa;EAEvC,IAAIC,iBAAiB,GAAGZ,KAAK,CAACa,UAAU,CAACV,YAAY,CAAC;IAClDW,UAAU,GAAGF,iBAAiB,CAACE,UAAU;EAE7C,IAAIA,UAAU,EAAE;IACd,OAAO,IAAI;EACb;EAEA,IAAIC,eAAe,GAAG,EA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